package org.learn.file.transformation;

import java.io.*;

public class OutputStreamWriter_ {
    public static void main(String[] args) throws IOException {
        String filePath = "d:\\hsp.txt";
        OutputStreamWriter osw  = new OutputStreamWriter(new FileOutputStream(filePath), "gbk");
        osw.write("hi,韩顺平教育");
        osw.close();
        System.out.println("按照gbk编码方式保存文件成功");
    }
}
